<include file="../Public/header.html" />
<link href="__PUBLIC__/Css/user.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Css/orderDetail.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2&services=true"></script>
<script type="text/javascript" src="__PUBLIC__/Js/kim.base.map.js"></script>
<script type="text/javascript">
function dosearch(){
	var s_passcode = jQuery.trim($('#s_passcode').val());
	var s_mobile = jQuery.trim($('#s_mobile').val());
	var verify = jQuery.trim($('#verify').val());
	
	if(s_passcode==''){k_error('请输入券码');return;}
	if( !k_check_mobile( s_mobile ) ){
		k_error('手机号码格式错误');return;
	}
	if(verify==''){k_error('请输入验证码');return;}
	$.kajax({      
			//ajx_rtn_type:'HTML',
			url:"{:U('Index://Index/searchcoupon')}",      
			type:'post', //数据发送方式  
			data:{passcode:s_passcode,mobile:s_mobile,verify:verify} ,    
			async: true ,//同步方式     
			success: function(htmldata){
				if(htmldata=='verify'){k_error('验证码错误！');return;}
				if(htmldata=='passcode'){k_error('请输入券码！');return;}
				if(htmldata=='mobile'){k_error('手机号码格式错误！');return;}
				changeverify();//查询成功重新获得验证码。
				if(htmldata=='coupon'){k_error( "心意券 ["+s_passcode+"] 不存在！");return;}
				showbasealert(htmldata);
			}
	});
}
function showbasealert(_html){
	$('#show_couponinfo').html(_html);
}
</script>
<!--页面主部-->
<div id="main"> 
	<php>
		$TOP_NAV_BOX_PARAM[]=array('desc'=>'查看'.K('SP_COUPON_NM'));
	</php>
	<include file="../Public/top_nav_box.html" />
	
	<div class="left_box">
		<div class="list_info" style="padding-bottom: 0px; padding-left: 10px; padding-right: 10px;background-color: #F8F8F8;border: 1px solid #EAEAEA;">
			<h2 style="text-align:center">在此可查看收到的{:K('SP_COUPON_NM')}!</h2>
		</div>
		<div class="list_info" style="padding-bottom: 5px; padding-left: 10px; padding-right: 10px;border-right: 1px solid #EAEAEA;border-bottom: 1px solid #EAEAEA;
    border-left: 1px solid #EAEAEA;">
			<h2>使用说明:</h2>
			<div>
		      	<ul>
		        	<php>$_tmp_sysm = K('SP_SYSM');
						foreach($_tmp_sysm as $_tmp_vo){</php>
							<li>{$_tmp_vo}</li>
					<php>}</php>
		      	</ul>
	    	</div>
		</div>
	</div>
	<!--主体左部，为商品详情页-->
	<div class="right_box">
		
		<div class="f14 tc" style="background: url('/Public/Images/title_tips_bg.gif') no-repeat scroll 0 bottom transparent;
    			margin-bottom: 10px; padding-bottom: 25px; text-align: center;"	>
			<span>
				{:K('SP_COUPON_NM')}码：<input id="s_passcode" type="text" class="normal_input" 
												title="录入接收到的{:K('SP_COUPON_NM')}码" style="font-size:14px;width:120px"/>
				&nbsp;&nbsp;&nbsp;
				手机号码：<input id="s_mobile" type="text" class="normal_input"  
							title="接收{:K('SP_COUPON_NM')}的手机号码" style="font-size:14px;width:80px"/>
				&nbsp;&nbsp;&nbsp;
				验证码：<input class="normal_input" name="verify" id="verify" value="" maxlength="6" 
							title="录入右边图片中的数字" style="font-size:14px;width:40px">
						<a href="javascript:void(0);" onclick="changeverify()" >
					    	<img src="{:U('Index://Public/verify')}" id="verifyimg" alt="验证码" title="点击重新获得验证码"/>
					   	</a>
				&nbsp;&nbsp;&nbsp;
				<input type="button" class="btn_r" value="查&nbsp;&nbsp;询" id="mobile" onclick="showbasealert('在上方录入信息查看收到的{:K('SP_COUPON_NM')}');dosearch();" />
			</span>
		</div>
		
		<div id ="show_couponinfo" style="text-align:center">
			在上方录入信息查看收到的{:K('SP_COUPON_NM')}！
		</div>
	</div>
</div>



<include file="../Public/footer.html" />